Sizer Control
Size Master Window Size Controller

Properties	Methods	Events

Description

You can use the Size Master Control (Sizer) to limit the minimum and maximum size and shape for any of your forms.  The control has properties for minimum and maximum tracking size, and maximized window size and position.  For example, by fixing the minimum tracking width, a user will be unable to resize the form smaller than the specified limit.  When installed on the form, the Sizer enforces its limits on the window size during both run and design mode.

All dimensions are in Twips.

Any property set to 0 is disabled, and will not affect the window dimensions.  The dimensions can be fixed at design time, and also changed at run time.

The Sizer is invisible at run time, and its position on the form is irrelevant.

File Name

SIZER.VBX

Remarks

You must have only one Sizer control per form.  The Sizer control applies its limits to the form on which it is placed, through processing the WM_GETMINMAXINFO messages.

If you place more than one Sizer on a form, you will be told that it is not being used, and must be removed.  You should then remove it immediately to avoid future errors.

The minimum tracking dimensions should not exceed the maximum tracking settings.  An error will be generated if you should change a setting such that an enabled maximum is less than a minimum.

Note:

Whenever tracking dimensions are changed, the window is resized to its current size and position.  If maximum or minimum limits apply, the window size will change accordingly.


Methods, Sizer Control <none>
Methods

There are no useful methods for the Sizer control.


Events, Sizer Control <none>
Events

There are no events for the Sizer control.


Properties

MinTrackWidth

MinTrackHeight

MaxTrackWidth

MaxTrackHeight

MaximizedWidth

MaximizedHeight

MaximizedLeft

MaximizedTop

Left

Top


MaxTrackWidth Property, Sizer Control
MaxTrackWidth
MaxTrackHeight

Apply To

Sizer

Description

These properties can be used to limit the minimum size of any form.  This is especially useful for limiting the minimum size to which a user can resize a form by dragging the borders with the mouse or using the system menu.

All dimensions are in Twips.

If either setting is set to 0, it is disabled and does not alter the behaviour of the window.

Usage

[form.]sizer.MaxTrackWidth [= numeric expression%]

[form.]sizer.MaxTrackHeight [= numeric expression%]

Remarks

The maximum tracking dimensions must not be set to non-zero values less than the minimum tracking dimensions.  Doing so will result in an error (SIZER_DIMENSION_ERR 20000)

Note:

Whenever tracking dimensions are changed, the window is resized to its current size and position.  If maximum or minimum limits apply, the window size will change accordingly.

DataType

Integer


MinTrackWidth Property, Sizer Control
MinTrackWidth
MinTrackHeight

Apply To

Sizer

Description

These properties can be used to limit the minimum size of any form.  This is especially useful for limiting the minimum size to which a user can resize a form by dragging the borders with the mouse or using the system menu.

All dimensions are in Twips.

If either setting is set to 0, it is disabled and does not alter the behaviour of the window.

Usage

[form.]sizer.MinTrackWidth [= numeric expression%]

[form.]sizer.MinTrackHeight [= numeric expression%]

Remarks

The minimum tracking dimensions must not be set to exceed the maximum tracking dimensions (when maximum settings are enabled to non-zero values).  Doing so will result in an error (SIZER_DIMENSION_ERR 20000)

Note:

Whenever tracking dimensions are changed, the window is resized to its current size and position.  If maximum or minimum limits apply, the window size will change accordingly.

DataType

Integer


Maximized Properties, Sizer Control
MaximizedWidth
MaximizedHeight
MaximizedLeft
MaximizedTop

Apply To

Sizer

Description

These properties can be used to fix the size and position for any form, when that form is maximized.  If a form has the Sizer control placed on it, the current settings of that sizer control will be applied to the form whenever the form is maximized (either because of user action or because of program instructions).

The MaximizedLeft and MaximizedTop coordinates specify the location of the maximized form on the screen.

All dimensions are in Twips.

If any setting is set to 0, it is disabled and does not alter the behaviour of the window.

Usage

[form.]sizer.MaximizedWidth [= numeric expression%]

[form.]sizer.MaximizedHeight [= numeric expression%]

[form.]sizer.MaximizedLeft [= numeric expression%]

[form.]sizer.MaximizedTop [= numeric expression%]

DataType

Integer


Tracking Size, defined
"Tracking" is the process of resizing a window.  This can either involve dragging the resize borders of a window with the mouse, or use of the system menu and keyboard arrows.